import { createApp } from "vue";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import "@/assets/styles/index.scss"; // global css
import "@/assets/styles/common.scss";
import App from "./App.vue";
import router from "./router";
// 引入导航守卫文件
import "./permission";
import store from "./store";
import commonComponents from "@/components/register-component";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";

const app = createApp(App);
app.use(ElementPlus);
app.use(router);
app.use(store);
// 全局注册组件
app.use(commonComponents);
app.mount("#app");
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
